<template>
    <div>
       <span>{{ id }}:{{ name }}:{{ msg }}:{{ age }}</span>
    </div>    
</template>

<script>
import {login} from "@/http/apis.js"
export default {
    name:"login",
    data() {
        return {
            id:'',
            name:'',
            age:'',
            msg:'',
        }
    },
    methods:{
        login1(){
            let params = {
                name:"zhangsan",
                pwd:"1234"
            }
            login(params).then((data)=>{
                console.log(data)
                this.msg = data.msg
                this.id = data.data.id
                this.name = data.data.name
                this.age = data.data.age
            })
        }        
    },
    created(){
        this.login1()
    }
}
</script>

<style>

</style>
